/**
 * 项目全局类型定义
 */

// 环境数据类型
export interface EnvData {
  temperature: number;    // 温度
  humidity: number;       // 湿度
  airQuality: number;     // 空气质量
  uvIndex: number;        // 紫外线强度
  lightIntensity: number; // 光感度
  pressure: number;       // 气压
  windSpeed: number;      // 风速
  pm25: number;          // PM2.5
}

// 消息类型
export interface MessageItem {
  id: string;
  time: string;
  content: string;
  type: 'info' | 'warning' | 'success' | 'error';
  priority?: 'low' | 'medium' | 'high';
}

// 设备状态类型
export interface DeviceStatus {
  id: string;
  name: string;
  status: 'online' | 'offline' | 'maintenance';
  location: string;
  lastUpdate: string;
}

// 图表数据类型
export interface ChartData {
  name: string;
  value: number;
  time?: string;
}

// 建筑物状态类型
export interface BuildingStatus {
  id: string;
  name: string;
  status: 'online' | 'offline' | 'maintenance';
  deviceCount: number;
  energyConsumption: number;
  lastUpdate: string;
  position: {
    x: number;
    y: number;
  };
}
